from meiduo_admin.permission.permission_serializers import PermissionViewSerializer,PermissionContentViewSerializer
from rest_framework.viewsets import ModelViewSet
from django.contrib.auth.models import Permission,ContentType
from meiduo_admin.my_paginate import MyPageNuberPagination
from rest_framework.generics import ListAPIView


class PermissionViewsSet(ModelViewSet):
    pagination_class = MyPageNuberPagination
    serializer_class = PermissionViewSerializer
    queryset = Permission.objects.order_by("id").all()

    #新增权限
class PermissionContentView(ListAPIView):

    serializer_class=PermissionContentViewSerializer
    queryset=ContentType.objects.all()

